package com.shenyong.serviceImpl;

import com.shenyong.entity.Blogroll;
import com.shenyong.entity.Notice;
import com.shenyong.mapper.DeskNoticeMapper;
import com.shenyong.service.DeskNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@Service
public class DeskNoticeServiceImpl implements DeskNoticeService {
    @Autowired
    private DeskNoticeMapper deskNoticeMapper;

    public List<Notice> announceNotice(String timex) {
        timex=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
        return deskNoticeMapper.announceNotice(timex);
    }

    @Override
    public List<Blogroll> getBlogroll() {
        return deskNoticeMapper.getBlogroll();
    }
}
